<?php 
class ArticleDataModel extends Model{
	public $table='article_data';
	
	public $validate =array(
	  array('content','nonull','内容不能为空',2,3),
	  array('keywords','maxlen:100','关键字不能超过100个字符',2,3)
	);
	/**
	 * 添加
	 */
	public function addData($aid){
//		if(!$this->create()) return false;
		//因为最终add方法添加的是$this->data
		//所以在$this->data中填的信息都会被插入到数据库
		$this->data['article_aid']=$aid;
		// p($this->data);die;
		return $this->add();
	}
	/**
	 * 编辑
	 */
	public function editData($aid){
		$this->where("article_aid={$aid}")->update();
	}
	
}







 ?>
 Upload/photo15/09/15611442545097.png,Upload/photo15/09/21601442545090.png
 Upload/photo15/09/70011442545217.png,Upload/photo15/09/98401442545210.png
 Upload/photo15/09/23711442547401.png,Upload/photo15/09/13601442547394.png